﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CApFLEXAttachmentEditorViewModel
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.ComponentModel;


namespace DnProcessSimulateCommands;

public class CApFLEXAttachmentEditorViewModel : INotifyPropertyChanged
{
  private bool m_isControlLoading;
  private bool m_isControlActivated;
  private bool m_isPreviewRunning;

  public CApFLEXAttachmentEditorViewModel()
  {
    this.m_isControlLoading = false;
    this.m_isControlActivated = false;
  }

  public bool IsControlLoading
  {
    get => this.m_isControlLoading;
    set
    {
      if (value == this.m_isControlLoading)
        return;
      this.m_isControlLoading = value;
      this.NotifyPropertyChanged(nameof (IsControlLoading));
    }
  }

  public bool IsControlActivated
  {
    get => this.m_isControlActivated;
    set
    {
      if (value == this.m_isControlActivated)
        return;
      this.m_isControlActivated = value;
      this.NotifyPropertyChanged(nameof (IsControlActivated));
    }
  }

  public bool IsPreviewRunning
  {
    get => this.m_isPreviewRunning;
    set
    {
      if (value == this.m_isPreviewRunning)
        return;
      this.m_isPreviewRunning = value;
      this.NotifyPropertyChanged(nameof (IsPreviewRunning));
      this.NotifyPropertyChanged("IsPreviewIdle");
    }
  }

  public bool IsPreviewIdle
  {
    get => !this.IsPreviewRunning;
    set => this.IsPreviewRunning = !value;
  }

  public event PropertyChangedEventHandler PropertyChanged;

  protected void NotifyPropertyChanged(string info)
  {
    PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
    if (propertyChanged == null)
      return;
    propertyChanged((object) this, new PropertyChangedEventArgs(info));
  }
}
